﻿using System;
using System.Collections.Generic;
using System.Text;
using SimpleFS.Core;

namespace SimpleFS.Services.Transactions.Implementations
{
    public class Rename : TransactableOperationTemplate
    {
        internal IFileSystemObject target = null;

        internal string newName = string.Empty;

        public Rename(IFileSystemObject target, string newName, IResourceManager resourceManager)
        {
            this.target = target;
            this.newName = newName;
            base.resourceManager = resourceManager;
        }

        protected override void Operate()
        {
            
        }

        public override void Commit()
        {
            this.target.Rename(this.newName);
        }

        public override void Rollback()
        {
            
        }
    }
}
